package cn.com.xjnt.vas.manage.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.frameworks.core.repository.BaseRepository;
import com.frameworks.core.service.AbstractBaseService;

import cn.com.xjnt.vas.manage.domain.entity.OrganizationRole;
import cn.com.xjnt.vas.manage.repository.OrganizationRoleRepository;
import cn.com.xjnt.vas.manage.service.OrganizationRoleService;

@Service
@Transactional
public class OrganizationRoleServiceImpl extends AbstractBaseService<OrganizationRole, Long> implements OrganizationRoleService {

	@Autowired
	private OrganizationRoleRepository organizationRoleRepository;
	
	@Override
	public void save(OrganizationRole entity) {
		super.saveOrUpdate(entity);
	}

	@Override
	public void update(OrganizationRole entity) {
		super.saveOrUpdate(entity);
	}

	@Override
	public List<OrganizationRole> findByOrganizationId(Long organizationId) {
		return organizationRoleRepository.findByOrganizationId(organizationId);
	}

	@Override
	protected BaseRepository<OrganizationRole, Long> getBaseRepository() {
		return organizationRoleRepository;
	}

}
